import {
	createStore
} from 'vuex';
export default createStore({
	state: {
		areaObject: {},
		curAreaNum: 0
	},
	mutations: {
		updateMyObject(state, payload) {
			state.areaObject = payload;
		},
		updateAreaNum(state, payload) {
			state.curAreaNum = payload;
		},
	},
	actions: {
		updateMyObject({
			commit
		}) {
			commit('updateMyObject');
		},
		updateAreaNum({
			commit
		}) {
			commit('updateAreaNum');
		}
	},
	getters: {
		areaObject: state => state.areaObject,
		curAreaNum: state => state.curAreaNum
	}
});